package com.example.testapplication;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class UserActivity extends Activity {

	protected CustomApplication app;
	
	public void onCreate(Bundle icicle) {
		super.onCreate(icicle);
		setContentView(R.layout.activity_user);
		
		// Get the application instance
		app = (CustomApplication)getApplication();

		TextView name = (TextView) findViewById(R.id.user_name);
		TextView email = (TextView) findViewById(R.id.user_email);
		Button sendButton = (Button) findViewById(R.id.user_submit);

		sendButton.setOnClickListener(sendListener);
		
		UserModel user = app.getUser();
		name.setText(user.getName());
		email.setText(user.getEmail());
		
	}
	
	private OnClickListener sendListener = new OnClickListener() {

		public void onClick(View v) {
			UserActivity.this.finish();
		}
	};
	
}
